//===============================================================================
// Microsoft patterns & practices
// Web Client Software Factory
//-------------------------------------------------------------------------------
// Copyright (C) Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//-------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================
using System;
using System.Configuration.Provider;
using WCSFContrib.PageFlow.Configuration;

namespace WCSFContrib.PageFlow
{
	/// <summary>
	/// Defines the contract for PageFlow providers.
	/// </summary>
	public interface IPageFlowProvider
	{
		/// <summary>
		/// Gets a <see cref="IPageFlow"/> of a specific <see cref="Type"/>.
		/// </summary>
		/// <param name="pageFlowType">The <see cref="Type"/> of <see cref="IPageFlow"/> to get.</param>
		/// <returns>An instance of an <see cref="IPageFlow"/> of the specified <see cref="Type"/>.</returns>
		IPageFlow GetPageFlow(Type pageFlowType);


		/// <summary>
		/// Gets a <see cref="IPageFlow"/> of a specific <see cref="Type"/>.
		/// </summary>
		/// <param name="instanceId"></param>
		/// <returns>The instance of an <see cref="IPageFlow"/> with the specified unique identifier.</returns>
		IPageFlow GetPageFlow(Guid instanceId);

		/// <summary>
		/// Handles a request for a specific page.
		/// </summary>
		/// <param name="url">The URL of the page.</param>
		/// <returns>A <see cref="ProcessResult"/> that describes how the request should be handled.</returns>
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#")]
        ProcessResult ProcessRequest(string url);

		// When you implement derived classes, you may want to consider
		// the following signature for your constructor.
		//public PageFlowProvider(PageFlowInstanceStoreProviderSection storeSection, PageFlowInstanceCorrelationTokenProviderSection tokenProviderSection);
	}
}
